package com.vercon.otamirror;

import android.accessibilityservice.AccessibilityServiceInfo;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.os.Looper;
import android.os.MessageQueue;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Log;

import android.view.KeyEvent;
import android.view.View;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityManager;
import android.widget.FrameLayout;
import android.widget.RelativeLayout;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentActivity;

import com.vercon.commonmirror.Constants;
import com.vercon.commonmirror.activity.PermissionsActivity;
import com.vercon.commonmirror.cache.MirrorDataStorage;
import com.vercon.commonmirror.utils.APPUtil;
import com.vercon.commonmirror.utils.LogUtils;
import com.vercon.commonmirror.utils.RxTimer;
import com.vercon.commonmirror.utils.langlib.CLang;
import com.vercon.otamirror.dialog.FirmwareUpdateDialog;
import com.vercon.otamirror.dialog.UpdateFirmwareDialog;


import com.vercon.otamirror.fragment.HomeFragment;
import com.vercon.otamirror.mode.FirmwareMode;


import com.vercon.otamirror.receiver.InstallBroadcast;
import com.vercon.otamirror.utils.helper.FragmentOpenManager;


import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

import java.util.List;
import java.util.concurrent.TimeUnit;

import butterknife.BindView;
import butterknife.ButterKnife;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;


/**
 * Created by csh on 2021/1/22
 * 主程序入口
 */
public class MainActivity extends Activity {

    private final String TAG = MainActivity.class.getSimpleName();
    //    private static final String BUNDLE_FRAGMENTS_KEY = "androidx.fragment.app:fragments";
    public static final String SCREEN_OFF = "android.intent.action.vercon.SCREEN_OFF";//关屏广播
    public static final String SCREEN_ON = "android.intent.action.vercon.SCREEN_ON";//开屏广播

    private RxTimer mRxTimer;


    public static FragmentActivity content;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //初始化界面
        setContentView(R.layout.activity_main);

    }

//    @Override
//    protected int setContentView(@Nullable Bundle savedInstanceState) {
//        //虚拟键不顶起界面
//        getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
//        return R.layout.activity_main;
//    }




    @Override
    protected void onStart() {
        finish();
        super.onStart();
        Log.d(TAG, "onStart");

    }

    @Override
    protected void onResume() {

        super.onResume();
        Log.d(TAG, "onResume");

    }

}